package two_xia.ex4._3_3;

public class Client {
    public static void main(String[] args) {
        CPU cpu;
        RAM ram;
        AbstractFactory abstractFactory;
        //HisenseTV
        abstractFactory = new PcFactory();
        cpu = abstractFactory.productCPU();
        cpu.product();
        ram = abstractFactory.productRAM();
        ram.product();
        //HaierTV播放中
        abstractFactory = new MacFactory();
        cpu = abstractFactory.productCPU();
        cpu.product();
        ram = abstractFactory.productRAM();
        ram.product();
    }
}
